// Fill out your copyright notice in the Description page of Project Settings.

#pragma once

#include "WorldEntity.h"
#include "WorldLaneValidity.h"

/**
 * An entity of a tunnel.
 */
class FWorldTunnel : public FWorldEntity
{

public:

	using Ptr = std::shared_ptr<FWorldTunnel>;
	using Super = FWorldEntity;

	FWorldEntityProperty< double >										S;
	FWorldEntityProperty< double >										Length;
	FWorldEntityProperty< std::string >									Name;
	FWorldEntityProperty< std::string >									Type;
	FWorldEntityProperty< double >										Lighting;
	FWorldEntityProperty< double >										Daylight;
	FWorldEntityPartArrayReference< FWorldLaneValidity, 0, INT_MAX >	Validity;

public:

	FWorldTunnel();
	FWorldTunnel(const json& j);
	~FWorldTunnel() override;

	void Resolve(FWorldEntityReferencing& referencing) override;

	WORLD_ENTITY_META_DECLARE(FWorldTunnel)

};
